<style>
    .rich-panel-body {
        font-size: 13px;
    }
    .rich-table-cell {
        border: 0px;
    }
</style>
<f:view>
    <h:form>
        <h:outputText value="Posting in #{sessionBean.ejbSession.currentSite.site}"  style="font-size: 20px; font-weight: bold;"  rendered="#{sessionBean.ejbSession.personal==null}"/>
        <h:outputText value="Posting in #{personalBean.personal.site.site}"  style="font-size: 20px; font-weight: bold;"  rendered="#{sessionBean.ejbSession.personal!=null}"/>
        <h:outputText value=", #{personalBean.area.area}"  style="font-size: 20px; font-weight: bold;" rendered="#{personalBean.areaId>0}"/>
        <br/>
        <h:outputText value="#{personalBean.personal.title},"  style="font-size: 18px; font-weight: bold;"/>
        <h:outputText value=" #{personalBean.personal.yourAge} years old"  style="font-size: 18px; font-weight: bold;" rendered="#{personalBean.personal.yourAge>0}" />
        <h:outputText value=" #{personalBean.personal.am}"  style="font-size: 18px; font-weight: bold;" />
        <h:outputText value=" > #{personalBean.personal.seeking}"  style="font-size: 18px; font-weight: bold;" rendered="#{personalBean.personal.seeking!=null && personalBean.personal.seeking!=''}" />
        <h:outputText value=" - (#{personalBean.personal.location})"  style="font-size: 18px; font-weight: bold;" rendered="#{personalBean.personal.location!=null && personalBean.personal.location!=''}" />
        <rich:separator height="1"/>
        <h:outputText value="Reply to: "/>
        <h:outputText value="your anonymous eez2find address will appear here" style="font-style: italic;" rendered="#{sessionBean.ejbSession.personal==null}" />
        <h:outputLink value="mailto:pers-#{personalBean.personal.code}@eez2find.com" rendered="#{sessionBean.ejbSession.personal!=null}">
            <h:outputText value="pers-#{personalBean.personal.code}@eez2find.com"></h:outputText>
        </h:outputLink>
        <br/>
        <h:outputText value="Date: #{personalBean.toDay}"/>
        <rich:spacer height="20"/>
        <rich:panel style="width:700px; border-color:white;">
            ${personalBean.description}
        </rich:panel>
        <rich:dataGrid columns="2" value="#{personalBean.uploadItems}" rowKeyVar="row" >
            <a4j:mediaOutput element="img" mimeType="image/jpg" createContent="#{personalBean.paintPreview}" value="#{row}" cacheable="false" />
        </rich:dataGrid>
        <ul>
            <c:if test="${personalBean.personal.location!=null && personalBean.personal.location!=''}"><li><h:outputText value="Location: #{personalBean.personal.location}" /></li></c:if>
            <c:if test="${personalBean.personal.othersContact}"><li><h:outputText value="it's ok to contact this poster with services or other commercial interests." /></li></c:if>
            <c:if test="${!personalBean.personal.othersContact}"><li><h:outputText value="it's NOT ok to contact this poster with services or other commercial interests." /></li></c:if>
        </ul>
        <rich:spacer height="10"/>
        <h:outputText value="Personal Code: #{personalBean.personal.code}" rendered="#{sessionBean.ejbSession.personal!=null}" />
    </h:form>
    <h:form>
        <h:messages globalOnly="true" style="color: red" styleClass="errorMessage"/>
        <h:panelGrid columns="2">
            <h:outputLink value="/site/faces/personalPosting/create.jsp" rendered="#{sessionBean.ejbSession.personal==null}">
                <h:outputText value="Back to Edit"></h:outputText>
            </h:outputLink>
            <h:outputLink value="/site/faces/personalPosting/edit.jsp" rendered="#{sessionBean.ejbSession.personal!=null}">
                <h:outputText value="Back to Edit"></h:outputText>
            </h:outputLink>
            <h:commandButton id="submitCreate" type="submit" value="Create" action="#{personalBean.create}" rendered="#{sessionBean.ejbSession.personal==null}"/>
            <h:commandButton id="submitUpdate" type="submit" value="Update" action="#{personalBean.update}" onclick="if(!confirm('Your Post has been edited. Are you sure?'))return false" rendered="#{sessionBean.ejbSession.personal!=null}" />
        </h:panelGrid>
    </h:form>
    <rich:separator height="1" />
</f:view>